'use strict'
let state = {
  // 费用报销用页面类型
  pageType: 'view',
  openSelectAlert: false,
  otherI18n: {},
  view1stMounted: false,
  pageTypeEnum: {
    'draft': 'draft',
    'approve': 'approve',
    'view': 'view',
    'approveFee': 'approveFee'
  },
  // 业务用-全局遮罩层，0为不遮罩
  apiloading: 0,
  // 子对话框遮罩层
  dialogloading: 0,
  // 业务计数使用
  apifinished: 0,
  // 业务用，异常判断
  returnCode: '000000',
  // (BPM高级选择弹出对话框类型)
  chooseDialogEnum: {
    'reimbursecompanyname': 'reimbursecompanyname',
    'reimbursecompanycostcenter': 'reimbursecompanycostcenter',
    'postcostcenter': 'postcostcenter',
    'splitcostcenter': 'splitcostcenter',
    'gatherupname': 'gatherupname',
    'accountBankNumber': 'accountBankNumber',
    'trainlink': 'trainlink',
    'aboardlink': 'aboardlink'
  },
  selectEnum: {
    'BB': 'sltBB',
    'paymentinternalorder': 'sltpaymentinternalorder',
    'paymentsubject': 'sltpaymentsubject',
    'splitinternalorder': 'sltsplitinternalorder',
    'splitsubject': 'sltsplitsubject',
    'postsubject': 'sltpostsubject'
  },
  ldap: {
    departmentArray: [], // 网上获取组织列表
    departmentData: [], // 通过组织列表计算出的组织树
    userArray: [] // 用户列表
  },
  // 起草的差旅双击，用于阻止内部订单的双击change 清空方法
  gridDBLClicked: {whBtReimburseDdSub: false},
  fybxzb: {
    total_ccf: '', // 孙子表的车船费
    total_clbt: '', // 孙子表的差旅补贴费
    total_czf: '', // 孙子表的出租车费
    total_zsf: ''// 孙子表的住宿费
  },
  ssc: {
    reimburse: {
      selectSubject: '', // 制证-计算车船统计时的临时变量
      fareFirstFlag: '', // 制证-车船费临时变量
      whBtReimburse: {
        tsId: '', // V3_modi:主键,primary key,primary key
        btNo: '', // V3_modi:申请单号,apply no,apply no
        piid: '', // V3_modi:流程实例id,instance id,instance id
        isSuperscalar: '', // V3_modi:是否超标,is_overproof,is_overproof
        gatherupcode: '', // V3_modi:实际收款人代码,actual payee code,actual payee code
        gatherupname: '', // V3_modi:实际收款人名称,actual payee,actual payee
        accountbankname: '', // V3_modi:开户银行名称,accout bank,actual bank
        accountbanknumber: '', // V3_modi:开户银行卡号,bank card,bank card
        accountbankcode: '', // V3_modi:开户银行代码,accout bank code,accout bank code
        reimbursecompanyname: '', // V3_modi:报销公司名称,company name,company name
        reimbursecompanyid: '', // V3_modi:报销公司ID,company id,company id
        reimbursecompanycode: '', // V3_modi:报销公司代码,company code,company code
        reimbursecompanycostcenter: '', // V3_modi:报销公司成本中心,cost center,cost center
        standardmoney: '', // V3_modi:本币位,currency,currency
        totalsum: '', // V3_modi:合计金额,total sum,total sum
        unpaidaggregateamount: '', // V3_modi:借款未还总金额,unpaid aggregate amount,unpaid aggregate amount
        chargeagainstsum: '', // V3_modi:本次冲抵金额,charge against sum,charge against sum
        folio: '', // V3_modi:张数（报销凭证）,A4 folio,A4 folio
        processlinkocr: '', // V3_modi:ORC 地址,ocr link,ocr link
        processlinkopentext: '', // V3_modi:影像链接地址,opentext link,opentext link
        reimbursecostcentercode: '', // V3_modi:成本中心代码,cost center code,cost center code
        trainapplicationlink: '', // V3_add:培训申请链接,train application link,train application link
        abroadapplicationlink: '', // V3_add:出国申请链接,abroad application link,abroad application link
        reimbStandardMoney: '', // V3_add:报销币种
        rate: '', // V3_add:汇率
        trainBtNo: '', // V3_add:培训申请表单
        abroadBtNo: '', // V3_add:出国申请表单
        gatherupNumber: '', // V3_add:实际收款人员工号
        employeeNumber: '', // V3_add:申请人工号
        chgTotalSum: '', // V3_add:实际报销金额本位币
        deptid: '', //
        deptname: '', //
        costshareActtotalsum: '', //
        isscan:'' //
      }, // 业务主表
      accountbanknumber: '',
      whBtReimburseDdSub: [], // 业务子表:订单数据
      whBtReimburseCostshare: [], // 业务子表：费用分摊表
      whBtReimburseRcmSub: {
        mid: '', // V3_modi:主键,primary key,primary key
        tsId: '', // V3_modi:外键,foreign key,foreign key
        companycode: '', // V3_modi:公司代码,company code,company code
        currency: '', // V3_modi:币别,currency,currency
        lookuptext: '', // V3_modi:抬头文本【制证人】,lookup text,lookup text
        certificatedate: '', // V3_modi:凭证日期,certificate date,certificate date
        postingdate: '', // V3_modi:过账日期,posting date,posting date
        createemployeeno: '', // V3_modi:申请人【员工号】,create employee no,craete employee no
        payeeemployeeno: '', // V3_modi:收款人【员工号】,payee employee no,payee employee no
        bankaccount: '', // V3_modi:银行账号,bank account,bank account
        bankcode: '', // V3_modi:银行代码,bank code,bank code
        bank: '', // V3_modi:银行开户行,bank,bank
        defraySum: '', // V3_modi:应支付金额,defray sum,defray sum
        certificateNo: '', // V3_modi:凭证号certificate no,certificate no
        btNo: '', // V3_add:报销单据
        totalSumFee: '', // V3_add:实际报销金额
        chargeAgainstSumFee: '', // V3_add:本次冲抵金额,charge against sum,charge against sum
        unpaidAggregateAmountFee: '' // V3_add:借款未还总金额,unpaid aggregate amount,unpaid aggregate amount
      }, // 业务子表: 制证主表
      whBtReimburseRcmDetail: [], // 业务子表: 制证子表
      whBtTravelSubsidyDetails: [], // 业务孙子表：补贴费
      whBtTransportationDetails: [], // 业务孙子表:出租费
      whBtFareDetails: [], // 业务孙子表:交通费
      whBtStayDetails: [], // 业务孙子表:住宿费
      crossCompanyInfo: [], // 跨公司提报数据
      costCenterList: [], // 成本中心数据
      staffBankList: [], // 员工卡号数据
      internalOrderList: [], // 内部订单数据
      budgetSubjectList: [], // 核算科目数据
      splitBudgetSubjectList: [], // 核算科目数据
      postBudgetSubjectList: [], // 核算科目数据
      bbOptions: [], // 报销币别
      trainApplyTitle: '',
      trainApplyList: [], // 培训申请列表
      abroadApplyTitle: '',
      abroadApplyList: [] // 出国申请列表
    },
    // 临时表数据
    cache: {
      // 报销明细临时表单数据
      paymentInfo: {
        internalOrderCode: '',
        internalOrderName: '',
        budgetSubjectCode: '',
        budgetSubjectName: '',
        notincludetaxessum: 0,
        taxrate: 0,
        reimbursesum: 0,
        actualreimbursesum: 0,
        summary: ''
      }
    }
  },
  whBtReimburseDdSub: {
    mid: '',
    tsId: '',
    subjectcode: ''
  }, // 制证环节，修改各孙子表数据记录父表差旅费数据
  retMsg: '', // 起草环节校验不通过时错误提示
  approveFeeUpdateResult: '', // 制证时处理结果是否正常
  checkExistResult: '', // 检查是否重复结果
  certNo: '', // 生成的制证号
  failMids: '', // 超预算行项目mid
  encryptTsId: '', // 培训申请，出国申请链接
  fareCheckedMmids: '', // 车船费选中的行号逗号分隔
  fyftCheckedMids: '', // 费用分摊明细选中的行号逗号分隔
  fyftclfGradState: '', // 费用分摊明细新增还是修改打开的
  bxmcCheckedMids: '', // 报销明细选中的行号逗号分隔
  fygbxmcCheckedMmids: '', // 报销明细选中的行号逗号分隔
  bxmxMid: '', // 报销明细差旅费父表的mid
  bxmxGradState: '', // 报销明细差旅费新增还是修改打开的tab
  checkResult: '',
  amountSum: '',
  mid: '', // 表格选中行号
  gridCheckboxMids: {}, // 表格选中复选框
  gridSelectIndex: {
    whBtReimburseRcmDetail: -1,
    whBtReimburseCostshare: -1
  },
  chailvRow: {
    ssc: {
      reimburse: {
        whBtReimburseDdSub: {
          mid: '', // V3_modi:主键,primary key,primary key
          tsId: '', // V3_modi:外键,foreign key,foreign key
          internalordercode: '', // V3_modi:内部订单代码,internal order code,internal order code
          internalordername: '', // V3_modi:内部订单名称,internal order name,internal order name
          subjectcode: '', // V3_modi:科目代码,subject code,subject code
          subjectname: '', // V3_modi:科目名称,subject name,subject name
          notincludetaxessum: '', // V3_modi:不含税金额,excluding tax sum,excluding tax sum
          taxrate: '', // V3_modi:税额,taxrate,taxrate
          reimbursesum: '', // V3_modi:报销金额,reimburse sum,reimburse sum
          actualreimbursesum: '', // V3_modi:实际报销金额,actual reimburse sum,actual reimburse sum
          summary: '', // V3_modi:摘要,summary,summary
          travelarea: '', // V3_modi:出差地区 【国内、国外】,travel area,travel area
          rate: '', // V3_add:汇率
          chgReimbSum: '', // V3_add:报销金额【本位币】
          receiveReason: '', // V3_add:接待事由
          receiveDate: '', // V3_add:接待日期
          receivePlace: '', // V3_add:接待地点
          costomer: '', // V3_add:来宾人员
          master: '', // V3_add:陪同人员
          addVar1: '', // V3_add:备用1
          addVar2: '', // V3_add:备用2
          addVar3: '', // V3_add:备用3
          chgActReimbSum: '' // V3_add:实际报销金额【本位币】,actual travel area,travel area
        } // 业务子表:订单数据
      }
    }
  },
  gridSelectRow: {
    ssc: {
      reimburse: {
        whBtReimburseDdSub: {
          mid: '', // V3_modi:主键,primary key,primary key
          tsId: '', // V3_modi:外键,foreign key,foreign key
          internalordercode: '', // V3_modi:内部订单代码,internal order code,internal order code
          internalordername: '', // V3_modi:内部订单名称,internal order name,internal order name
          subjectcode: '', // V3_modi:科目代码,subject code,subject code
          subjectname: '', // V3_modi:科目名称,subject name,subject name
          notincludetaxessum: '', // V3_modi:不含税金额,excluding tax sum,excluding tax sum
          taxrate: '', // V3_modi:税额,taxrate,taxrate
          reimbursesum: '', // V3_modi:报销金额,reimburse sum,reimburse sum
          actualreimbursesum: '', // V3_modi:实际报销金额,actual reimburse sum,actual reimburse sum
          summary: '', // V3_modi:摘要,summary,summary
          travelarea: '', // V3_modi:出差地区 【国内、国外】,travel area,travel area
          rate: '', // V3_add:汇率
          chgReimbSum: '', // V3_add:报销金额【本位币】
          receiveReason: '', // V3_add:接待事由
          receiveDate: '', // V3_add:接待日期
          receivePlace: '', // V3_add:接待地点
          costomer: '', // V3_add:来宾人员
          master: '', // V3_add:陪同人员
          addVar1: '', // V3_add:备用1
          addVar2: '', // V3_add:备用2
          addVar3: '', // V3_add:备用3
          chgActReimbSum: '' // V3_add:实际报销金额【本位币】,actual travel area,travel area
        }, // 业务子表:订单数据
        whBtReimburseCostshare: {
          tsId: '', // tsId
          mid: '', // mid
          costcentercode: '', // 成本中心代码
          costcentername: '', // 成本中心名称
          internalordercode: '', // 内部订单代码
          internalordername: '', // 内部订单名称
          subjectcode: '', // 科目代码
          subjectname: '', // 科目名称
          notaxamountCurrency: '', // 不含税金额(本位币)
          taxCurrency: '', // 税额(本位币)
          reimbursesumCurrency: '', // 申请报销金额(本位币)
          actualreimbursesumCurrency: '', // 实际报销金额(本位币)
          costcenterbudget: '', // 成本中心预算(本位币)
          notaxamount: '', // 报销币别不含税金额
          tax: '', // 报销币别税额
          reimbursesum: '', // 报销币别申请报销金额
          actualreimbursesum: '' // 报销币别实际报销金额
        }, // 业务子表：费用分摊表
        whBtReimburseRcmSub: {
          mid: '', // V3_modi:主键,primary key,primary key
          tsId: '', // V3_modi:外键,foreign key,foreign key
          companycode: '', // V3_modi:公司代码,company code,company code
          currency: '', // V3_modi:币别,currency,currency
          lookuptext: '', // V3_modi:抬头文本【制证人】,lookup text,lookup text
          certificatedate: '', // V3_modi:凭证日期,certificate date,certificate date
          postingdate: '', // V3_modi:过账日期,posting date,posting date
          createemployeeno: '', // V3_modi:申请人【员工号】,create employee no,craete employee no
          payeeemployeeno: '', // V3_modi:收款人【员工号】,payee employee no,payee employee no
          bankaccount: '', // V3_modi:银行账号,bank account,bank account
          bankcode: '', // V3_modi:银行代码,bank code,bank code
          bank: '', // V3_modi:银行开户行,bank,bank
          defraySum: '', // V3_modi:应支付金额,defray sum,defray sum
          certificateNo: '', // V3_modi:凭证号certificate no,certificate no
          btNo: '', // V3_add:报销单据
          totalSumFee: '', // V3_add:实际报销金额
          chargeAgainstSumFee: '', // V3_add:本次冲抵金额,charge against sum,charge against sum
          unpaidAggregateAmountFee: '' // V3_add:借款未还总金额,unpaid aggregate amount,unpaid aggregate amount
        }, // 业务子表: 制证主表
        whBtReimbursePrivBo: {
          fareCountry: '',
          fareCity: '',
          stayCountry: '',
          stayCity: '',
          stayTogether: '',
          stayTogetherMan: '',
          stayTogetherWoman: '',
          stayPersonNum: ''
        }, // 缓存business表
        whBtReimburseRcmDetail: {
          mid: '', // V3_modi:辅助id,assistant id,assistant id
          tsId: '', // V3_modi:外键,foreign key,foreign key
          accoutingsubject: '', // V3_modi:核算科目【只取前10位】,accounting subject,accounting subject
          costcentercode: '', // V3_modi:成本中心代码,cost center code,cost center code
          subjecttype: '', // V3_modi:科目类型,subject type,subject type
          notincludetaxessum: '', // V3_modi:不含税金额,excluding tax sum,excluding tax sum
          taxrate: '', // V3_modi:税额,taxrate,taxrate
          costcentername: '', // V3_modi:成本中心名称,cost center name,cost center name
          ordercode: '', // V3_modi:内部订单代码,internal order code,internal order code
          subjectcode: '', // V3_modi:核算科目代码,accounting subject code,accounting subject code
          mmid: '', // V3_modi:主键,primary key,primary key
          transferTax: '', //
          notincludetaxessumBx: '', // 报销币别不含税金额
          taxrateBx: '', // 报销币别税额
          transferTaxBx: '', // 报销币别转出税额
          orderName: '' // 内部订单名称
        }, // 业务子表: 制证子表
        whBtTravelSubsidyDetails: {
          mmid: '', // V3_modi:主键,primary key,primary key
          mid: '', // V3_modi:外键,foreign key,foreign key
          city: '', // V3_modi:城市,city,city
          subsidycriteria: '', // V3_modi:补贴标准,allowance standard,allowance standard
          remaindays: '', // V3_modi:停留天数,remain days,remain days
          subsidydays: '', // V3_modi:补贴天数,allowance days,allowance days
          actualremibursesum: '', // V3_modi:实际补贴金额,actual reimburse sum,actual reimburse sum
          remark: '', // V3_modi:备注,remark,remark
          tsId: '' //
        }, // 业务孙子表：补贴费
        whBtTransportationDetails: {
          mmid: '', // V3_modi:主键,primary key,primary key
          mid: '', // V3_modi:外键,foreign key,foreign key
          city: '', // V3_modi:城市,city,city
          transportation: '', // V3_modi:交通工具,transportation,transportation
          billscount: '', // V3_modi:票据张数,bills count,bills count
          billssum: '', // V3_modi:票面金额,bills sum,bills sum
          actualremibursesum: '', // V3_modi:实际报销金额,actual reimburse sum,actual reimburse sum
          remark: '', // V3_modi:备注,remark,remark
          tsId: '' //
        }, // 业务孙子表:出租费
        whBtFareDetails: {
          mmid: '', // V3_modi:主键,primary key,primary key
          mid: '', // V3_modi:外键,foreign key,foreign key
          departuredate: '', // V3_modi:出发日期,departure date,departure date
          transportation: '', // V3_modi:交通工具,transportation,transportation
          billssum: '', // V3_modi:票面金额,bills sum,bills sum
          actualremibursesum: '', // V3_modi:实际报销金额,actua reimburse sum,actual reimburse sum
          remark: '', // V3_modi:备注,remark,remark
          tsId: '', //
          country: '', // V3_add:国家
          city: '', // V3_add:城市
          leaveDate: '', // V3_add:离开日期
          together: '', // V3_add:同行人员
          notaxamount: '', //
          tax: '' //
        }, // 业务孙子表:交通费 车船
        whBtStayDetails: {
          mmid: '', // V3_modi:主键,primary key,primary key
          mid: '', // V3_modi:外键,foreign key,foreign key
          city: '', // V3_modi:城市,city,city
          hotelsname: '', // V3_modi:酒店名称,hotels name,hotels name
          days: '', // V3_modi:入住天数,accommodation days,accommodation days
          billssum: '', // V3_modi:票面金额,bills sum,bills sum
          actualremibursesum: '', // V3_modi:实际报销金额,actual reimburse sum,actual reimburse sum
          remark: '', // V3_modi:备注,remark,remark
          tsId: '', //
          country: '', // V3_add:国家
          stayDate: '', // V3_add:入住日期
          together: '', // V3_add:入住人员
          personNum: '', // V3_add:入住人数
          notaxamount: '', //
          tax: '', //
          togetherMan: '', //
          togetherWoman: '' //
        }, // 业务孙子表:住宿费
        crossCompanyInfo: {}, // 跨公司提报数据
        staffBankList: {}, // 员工卡号数据
        costCenterList: {}, // 成本中心数据
        internalOrderList: {}, // 内部订单数据
        budgetSubjectList: {}, // 核算科目数据_报销明细
        postCostCenterList: {}, // 成本中心数据
        postInternalOrderList: {}, // 内部订单数据
        postBudgetSubjectList: {}, // 核算科目数据
        splitCostCenterList: {}, // 成本中心数据
        splitInternalOrderList: {}, // 内部订单数据
        splitBudgetSubjectList: {}, // 核算科目数据
        bbOptions: {} // 报销币别
      }
    }
  },
  // 页面数据
  gridPageInfo: {
    ssc: {
      reimburse: {
        whBtReimburseDdSub: { start: 0, max: 0, count: 10 }, // 业务子表:订单数据
        whBtReimburseCostshare: { start: 0, max: 0, count: 10 }, // 业务子表：费用分摊表
        whBtReimburseRcmSub: { start: 0, max: 0, count: 10 }, // 业务子表: 制证主表
        whBtReimburseRcmDetail: { start: 0, max: 0, count: 10 }, // 业务子表: 制证子表
        whBtTravelSubsidyDetails: { start: 0, max: 0, count: 10 }, // 业务孙子表：补贴费
        whBtTransportationDetails: { start: 0, max: 0, count: 10 }, // 业务孙子表:出租费
        whBtFareDetails: { start: 0, max: 0, count: 10 }, // 业务孙子表:交通费
        whBtStayDetails: { start: 0, max: 0, count: 10 }, // 业务孙子表:住宿费
        trainApplyList: { start: 0, max: 0, count: 10 }, // 业务子表:培训申请列表
        abroadApplyList: { start: 0, max: 0, count: 10 } // 业务子表:出国申请列表
      }
    }
  },
  subGridSelectRow: {
    ssc: {
      reimburse: {
        whBtReimburseDdSub: {
          mid: '', // V3_modi:主键,primary key,primary key
          tsId: '', // V3_modi:外键,foreign key,foreign key
          internalordercode: '', // V3_modi:内部订单代码,internal order code,internal order code
          internalordername: '', // V3_modi:内部订单名称,internal order name,internal order name
          subjectcode: '', // V3_modi:科目代码,subject code,subject code
          subjectname: '', // V3_modi:科目名称,subject name,subject name
          notincludetaxessum: '', // V3_modi:不含税金额,excluding tax sum,excluding tax sum
          taxrate: '', // V3_modi:税额,taxrate,taxrate
          reimbursesum: '', // V3_modi:报销金额,reimburse sum,reimburse sum
          actualreimbursesum: '', // V3_modi:实际报销金额,actual reimburse sum,actual reimburse sum
          summary: '', // V3_modi:摘要,summary,summary
          travelarea: '', // V3_modi:出差地区 【国内、国外】,travel area,travel area
          rate: '', // V3_add:汇率
          chgReimbSum: '', // V3_add:报销金额【本位币】
          receiveReason: '', // V3_add:接待事由
          receiveDate: '', // V3_add:接待日期
          receivePlace: '', // V3_add:接待地点
          costomer: '', // V3_add:来宾人员
          master: '', // V3_add:陪同人员
          addVar1: '', // V3_add:备用1
          addVar2: '', // V3_add:备用2
          addVar3: '', // V3_add:备用3
          chgActReimbSum: '' // V3_add:实际报销金额【本位币】,actual travel area,travel area
        } // 业务子表:订单数据
      }
    }
  },
  // 只读页面费用岗的显隐控制,可用预算的显隐控制，差旅费由差旅明细统一控制
  viewTableVisible: {
    // travelTable: false,
    feePosition: false,
    costCenterBudget: false
  }
}
export default state
